<?php

/*

Change Stock (change_stock.php)

*/

$page_title = "Change Stock";
$rank_check = 7;
include "header.inc.php";

print "$openHTML";

$multiplier = .5;

$findItems = mysql_query("SELECT * FROM shop_items2 WHERE game = '$game'");
while ($getItems = mysql_fetch_array($findItems))
{
	$set_stock = ceil($getItems[max_stock] * $multiplier);
	if ($set_stock <= 0) { $set_stock = 1; }
	mysql_query("UPDATE shop_items2 SET max_stock = '$set_stock' WHERE id = '$getItems[id]'");
	print "$getItems[item_name] has changed from $getItems[max_stock] to $set_stock!<br>";
}

print "$closeHTML";
?>